import {ElNotification } from "element-plus";

export const successMessage=(message:any)=>{
    ElNotification({
        title:"Success",
        message,
        type:"success"
    })
}

export const warningMessage=(message:any)=>{
    ElNotification({
        title:"warning",
        message,
        type:"warning"
    })
}

// export const debounceMessage = debounce(Notification,500);
// function debounce(func, wait) {
//     let timeout;
//     return function () {
//         const context = this;
//         const args = [...arguments];
//         if (timeout) clearTimeout(timeout);
//         timeout = setTimeout(() => {
//             func.apply(context, args)
//         }, wait);
//     }
// }